﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Main.Model
{
    /// <summary>
    /// 测试记录
    /// </summary>
    public class WordTestInfo
    {
       
        private DateTime date;
        /// <summary>
        /// 测试时间
        /// </summary>
        public DateTime Date
        {
            get { return date; }
            set { date = value; }
        }
        private List<WordInfo> wrongWords;

        public List<WordInfo> WrongWords
        {
            get
            {
                if(this.wrongWords==null)
                {
                    this.wrongWords = new List<WordInfo>();
                }
                return wrongWords;
            }
        }
        private int sumCount=0;
        /// <summary>
        /// 总数量
        /// </summary>
        public int SumCount
        {
            get { return sumCount; }
            set { sumCount = value; }
        }
        /// <summary>
        /// 错误单词数量
        /// </summary>
        public int WrongCount
        {
            get
            {
                if(this.wrongWords!=null)
                {
                    return this.wrongWords.Count;
                }
                else
                {
                    return 0;
                }
            }
        }
        /// <summary>
        /// 正确单词数量
        /// </summary>
        public int RightCount
        {
            get
            {
                return this.SumCount - this.WrongCount;
            }
        }

    }
}
